

<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
    <style>
    /* base */
    html,
    body,
    .container {
      width: 100%;
      height: 100%;
    }

    a,
    a:link,
    a:visited {
      text-decoration: none;
      color: inherit;
    }

    ul {
      list-style: none;
    }

    *,
    ::before,
    ::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    *:focus {
      outline: 0;
    }

    .container {
      display: flex;
      padding-top: 20px;
    }

    /* Nav */
    .container .doc-nav {
      position: fixed;
      height: 100%;
      margin: 0 30px 0 40px;
      width: 280px;
    }

    .doc-nav .nav-header {
      display: flex;
      align-items: center;
      box-sizing: border-box;
      background-color: rgb(240, 241, 242);
      height: 40px;
      padding: 16px;
      font-size: 18px;
      font-weight: 500;
      color: rgb(62, 64, 66);
      cursor: pointer;
    }

    .doc-nav .nav-content {
      height: calc(100% - 40px);
      overflow-y: auto;
      color: rgb(32, 34, 36);
    }

    .doc-nav .nav-content .nav-list,
    .doc-nav .nav-content .nav-sub-list {
      line-height: 1.5rem;
    }

    .doc-nav .nav-content .nav-label {
      display: inline-block;
      position: relative;
      padding: 2px 0 2px 20px;
      margin-bottom: 4px;
    }

    .doc-nav .nav-content .nav-sub-label {
      position: relative;
      padding: 2px 0 2px 40px;
      font-size: 14px;
    }

    .doc-nav .nav-content .nav-sub-label:hover {
      text-decoration: underline;
    }

    .doc-nav .nav-content .nav-list .nav-label.group::before {
      border-bottom: 0.25rem solid transparent;
      border-left: 0.25rem solid #6e7072;
      border-right: 0;
      border-top: 0.25rem solid transparent;
      content: '';
      display: block;
      height: 0;
      left: 0.5rem;
      position: absolute;
      top: 0.625rem;
      transition: transform 0.1s linear;
      width: 0;
    }

    .doc-nav .nav-content .nav-list .nav-label.group.active::before {
      transform: rotate(90deg);
    }

    /* doc content */
    .container .doc-content {
      position: fixed;
      height: 100%;
      width: calc(100% - 80px - 40px - 30px - 240px);
      right: 0%;
      overflow-y: auto;
    }

    .doc-title {
      border-bottom: 1px solid #dcdee0;
      font-size: 22px;
      margin: 8px 0 0;
      padding-bottom: 16px;
    }

    .doc-content h3 {
      font-size: 24px;
      font-weight: 600;
      margin: 24px 0;
    }

    .doc-content h4 {
      font-size: 22px;
      font-weight: 500;
      margin: 30px 0 8px;
    }

    .doc-content h4 span {
      color: #007d9c;
    }

    .doc-content .doc-declare {
      background-color: #fafafa;
      border-radius: 5px;
      border: 1px solid #ccc;
      font-size: 14px;
      overflow-x: auto;
      padding: 10px;
      tab-size: 4;
      line-height: 20px;
    }

    .doc-content .doc-comment {
      font-size: 16px;
      margin: 16px 0;
      line-height: 24px;
      word-break: break-word;
    }
  </style>

</head>
<body>
  <div class="container">
    <div class="doc-nav">
      <a href="#Documentation" class="nav-header">Documentation</a>
      <nav class="nav-content">
        <ul class="nav-list">
          <li>
            <a href="#includes" class="nav-label">Includes</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#tuya_hal_network.h" class="nav-sub-label">tuya_hal_network.h</a>
              </li>
      

              <li>
                <a href="#tuya_hal_wired.h" class="nav-sub-label">tuya_hal_wired.h</a>
              </li>
      

              <li>
                <a href="#tuya_cloud_types.h" class="nav-sub-label">tuya_cloud_types.h</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#macros" class="nav-label">Macros</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#_BASE_NW_INTF_H" class="nav-sub-label">_BASE_NW_INTF_H</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#functions" class="nav-label">Functions</a>
             
            <ul class="nav-sub-list">

              <li>
                <a href="#bnw_get_ip" class="nav-sub-label">bnw_get_ip</a>
              </li>
      

              <li>
                <a href="#bnw_set_station_connect" class="nav-sub-label">bnw_set_station_connect</a>
              </li>
      

              <li>
                <a href="#bnw_station_get_conn_ap_rssi" class="nav-sub-label">bnw_station_get_conn_ap_rssi</a>
              </li>
      

              <li>
                <a href="#bnw_get_mac" class="nav-sub-label">bnw_get_mac</a>
              </li>
      

              <li>
                <a href="#bnw_set_mac" class="nav-sub-label">bnw_set_mac</a>
              </li>
      

              <li>
                <a href="#bnw_if_wired_connect_net" class="nav-sub-label">bnw_if_wired_connect_net</a>
              </li>
      

              <li>
                <a href="#bnw_station_conn" class="nav-sub-label">bnw_station_conn</a>
              </li>
      

              <li>
                <a href="#bnw_need_wifi_cfg" class="nav-sub-label">bnw_need_wifi_cfg</a>
              </li>
      
            </ul>
            
          </li>
          <li>
            <a href="#vars" class="nav-label">Vars</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#consts" class="nav-label">Consts</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#types" class="nav-label">Types</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
          <li>
            <a href="#typedefs" class="nav-label">Typedefs</a>
            
            <ul class="nav-sub-list">
            
            </ul>
            
          </li>
        </ul>
      </nav>
    </div>
    <div class="doc-content">
      <h2 id="Documentation" class="doc-title">Documentation</h2>
      <h3 id="includes">Includes</h3>
      

      <h4 id="tuya_hal_network.h"><span>tuya_hal_network.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_hal_network.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_hal_network.h"
</pre>

      <h4 id="tuya_hal_wired.h"><span>tuya_hal_wired.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_hal_wired.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_hal_wired.h"
</pre>

      <h4 id="tuya_cloud_types.h"><span>tuya_cloud_types.h</span></h4>
      <pre class="doc-declare"><code>#include "tuya_cloud_types.h"
</code></pre>
      <pre class="doc-comment">#include "tuya_cloud_types.h"
</pre>
      <h3 id="macros">Macros</h3>
      

      <h4 id="_BASE_NW_INTF_H">Marco <span>_BASE_NW_INTF_H</span></h4>
      <pre class="doc-declare"><code>#define _BASE_NW_INTF_H
</code></pre>
      <pre class="doc-comment"></pre>
      <h3 id="functions">Functions</h3>
      

      <h4 id="bnw_get_ip">Func <span>bnw_get_ip</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET bnw_get_ip(OUT NW_IP_S *ip);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_get_ip 
 * @desc get the ip address of the wired network interface
 *
 * @param[out] ip: the ip address
 *
 * @return OPRT_OK: success  Other: fail
 *
 * @note this api can used when in wired or wired&wifi mode
 */</pre>

      <h4 id="bnw_set_station_connect">Func <span>bnw_set_station_connect</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET bnw_set_station_connect(IN const char *ssid,IN const char *passwd);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_set_station_connect 
 * @desc connect to a special ap
 *
 * @param[in] ssid: the ap ssid
 * @param[in] passwd: the ap password
 *
 * @return OPRT_OK: success  Other: fail
 *
 * @note this api only can used when in wired&wifi mode
 */</pre>

      <h4 id="bnw_station_get_conn_ap_rssi">Func <span>bnw_station_get_conn_ap_rssi</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET bnw_station_get_conn_ap_rssi(OUT int8_t *rssi);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_station_get_conn_ap_rssi 
 * @desc get the connected ap rssi infomation
 *
 * @param[OUT] rssi: the ap rssi, rssi=99 if in wired mode, rssi=actually rssi if in wired&wifi mode
 *
 * @return OPRT_OK: success  Other: fail
 *
 * @note this api can used when in wired or wired&wifi mode
 */</pre>

      <h4 id="bnw_get_mac">Func <span>bnw_get_mac</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET bnw_get_mac(OUT NW_MAC_S *mac);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_get_mac 
 * @desc get the mac address of the wired network interface
 *
 * @param[OUT] mac: the mac address
 *
 * @return OPRT_OK: success  Other: fail
 *
 * @note this api can used when in wired or wired&wifi mode
 */</pre>

      <h4 id="bnw_set_mac">Func <span>bnw_set_mac</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET bnw_set_mac(IN const NW_MAC_S *mac);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_set_mac 
 * @desc set the mac address of the wired network interface
 *
 * @param[in] mac: the mac address
 *
 * @return OPRT_OK: success  Other: fail
 *
 * @note this api can used when in wired or wired&wifi mode
 */</pre>

      <h4 id="bnw_if_wired_connect_net">Func <span>bnw_if_wired_connect_net</span></h4>
      <pre class="doc-declare"><code>OPERATE_RET bnw_if_wired_connect_net(BOOL_T *status);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_if_wired_connect_net 
 * @desc get the status of the wired network interface
 *
 * @param[out] status: the connection status, TRUE means connected, FALSE means not connected
 *
 * @return OPRT_OK: success  Other: fail
 *
 * @note this api can used when in wired or wired&wifi mode
 */</pre>

      <h4 id="bnw_station_conn">Func <span>bnw_station_conn</span></h4>
      <pre class="doc-declare"><code>BOOL_T bnw_station_conn(void);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_station_conn 
 * @desc get the status of the wifi network interface
 *
 * @return TRUE： connected, FALSE： not connected
 *
 * @note this api can used when in wired or wired&wifi mode
 */</pre>

      <h4 id="bnw_need_wifi_cfg">Func <span>bnw_need_wifi_cfg</span></h4>
      <pre class="doc-declare"><code>BOOL_T bnw_need_wifi_cfg(void);</code></pre>
      <pre class="doc-comment">/**
 * @brief bnw_need_wifi_cfg 
 * @desc check if need config wifi
 *
 * @return TRUE： connected, FALSE： not connected
 *
 * @note this api can used when in wired or wired&wifi mode, 
 * it will used to add a wf_cfg infomation in lan discocery packet, 
 * and support set wifi ssid and passwd from lan.
 */</pre>
      <h3 id="vars">Vars</h3>
      
      <h3 id="consts">Consts</h3>
      
      <h3 id="types">Types</h3>
      
      <h3 id="typedefs">Typedefs</h3>
      
    </div>
  </body>
</html>
            